package com.lechuang.goods.service.impl;

import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lechuang.goods.entity.GoodsRegionSku;
import com.lechuang.goods.service.GoodsRegionSkuService;
import com.lechuang.goods.mapper.GoodsRegionSkuMapper;
import com.lechuang.goods.vo.GoodsRegionSkuVO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

/**
* @author apple
* @description 针对表【goods_region_sku(区域商品sku表)】的数据库操作Service实现
* @createDate 2024-06-25 10:47:58
*/
@Service
public class GoodsRegionSkuServiceImpl extends ServiceImpl<GoodsRegionSkuMapper, GoodsRegionSku>
    implements GoodsRegionSkuService{


    @Resource
    private GoodsRegionSkuMapper goodsRegionSkuMapper;

    @Override
    public List<GoodsRegionSkuVO> getBySpuIds(Set<Long> spuIdSet) {
        if(CollUtil.isEmpty(spuIdSet)){
            return new ArrayList<>();
        }
        return goodsRegionSkuMapper.getBySpuIds(spuIdSet);
    }
}




